<template>
	<view>
		<view class="schoollist ">
			<view class="school-list">
				<block v-for="(item,i) in items" :key="i">
					<view class="school-list-item">
						<block v-for="(item_k,k) in 2" :key="k">
							<view v-if="items[i+k] != null && i%2 == 0 " class="school-list-info" :class="!isVerticalScreen ? 'img-size':''" :data-index="i+k" :data-baping="items[i+k]"
							 @tap="increaseFn">
								<!-- <image :id="'img'+items[i+k].kid" :class="showId == items[i+k].kid ? 'school-list-photo-Selected':'school-list-photo'"
								 :src="'data:image/png;base64,'+items[i+k].imageContent" /> -->
								<image :id="'img'+items[i+k].kid" :class="showId == items[i+k].kid ? 'school-list-photo-Selected':'school-list-photo'"
								 :src="items[i+k].imageContent" />
								<image v-if="items[i+k].free == 1" class="school-list-photo-free-up" src="../../static/images/free.png" />
								<image v-if="items[i+k].free == 0" class="school-list-photo-free-up" src="../../static/images/notfree.png" />
								<view v-if="items[i+k].state != 1" class="school-list-photo school-list-photo-up">
									<text class="school-list-notLoad">{{items[i+k].state == 0 ?'未下载' : '下载中'}}</text>
								</view>
								<text class="school-list-desc">{{items[i+k].name}}</text>
							</view>
						</block>
					</view>
				</block>
			</view>
		</view>

		<!-- 设置霸屏内容 -->
		<view v-if="hiddenmodalput" class="bapingContent" :style="{'bottom':inputBottom}">
			<view class="closeBpsetting" @tap="closeBpSet">
				<image src='../../static/images/close.png'></image>
			</view>
			<form class="sendMessage">
				<view class="message">
					<!-- <image class="school-list-photo2" :src="'data:image/png;base64,'+bpZhuti" /> -->
					<image class="school-list-photo2" :src="bpZhuti" />
					<view v-if="selectTime" class='select_box'>
						<text style="margin-right: 16rpx;">时长:</text>
						<Select :prop-array='selectData' prop-type='name' prop-color='3' @selectClick="selectClick"></Select>
						<text style="margin-left: 16rpx;">{{price}}元</text>
					</view>
					<image class="school-list-photo2" :src="bpImg"></image>
					<view class="input-text-voice-super">
						<image src="../../static/images/keyboard.png" class="extra-btn-style1" />
						<input type="text" class="chat-input-style" maxlength="500" placeholder="请输入霸屏内容.." :value="bapingword" @input="bindChange"
						 @confirm="send" :adjust-position='false' confirm-type="send" @focus="focusFn" @blur="blurFn" :disabled="isdisabled" />
						<image v-if="increase" src="../../static/images/addImg.png" class="extra-btn-style2" @tap="chooseImage" />
						<button hover="true" hover-class="btnhover" class="chat-input-send-button-style" @tap='send'>发送</button>
					</view>
				</view>
			</form>
		</view>
		<!-- 互动 -->
		<hudong ref="hudong" :hudongIp="hudongIp"></hudong>
		<!-- 密码校验 -->
		<check-pwd ref="pwd" :localServerIP="localIP"></check-pwd>
		<!-- 控制 -->
		<e-control ref="control"></e-control>
		<!-- 关于 -->
		<about-us ref="about"></about-us>

		<!-- 功能悬浮球 -->
		<!--bindmenuItemClick为按钮点击的时候的回调方法  mainmodel是显示的按钮，menulist为折叠的菜单的数组数据-->
		<movemenu @menuItemClick="menuItemClick"></movemenu>
	</view>
</template>

<script>
	const app = getApp()
	var page = 1;
	var hadLastPage = false;
	var cloundLists = []; //云端素材
	var localsrcs = []; //本地素材
	var timer = null;

	import http from '../../utils/http.js'
	import websocket from '../../utils/websocket.js';
	import utils from '../../utils/util.js';
	import hudong from '../../components/hudong/index.vue'
	import eControl from '../../components/control/index.vue'
	import aboutUs from '../../components/about/index.vue'
	import Select from '../../components/select/select.vue'
	import movemenu from '../../components/movemenu/movemenu.vue'
	import checkPwd from '../../components/checkPwd/index.vue'
	export default {
		components: {
			hudong,
			checkPwd,
			aboutUs,
			eControl,
			Select,
			movemenu
		},
		data() {
			return {
				hiddenmodalput: false,
				items: [], //后台霸屏效果
				materialList: [],
				newslist: [],
				userInfo: {},
				scrollTop: 0,
				increase: true, //霸屏图片是否显示
				isdisabled: false, //禁止霸屏文字输入
				bapingid: '', //选中的id
				aniStyle: true, //动画效果
				previewImgList: [],
				selectTime: false, //控制显示时长价格，false隐藏、true显示
				selectShow: false, //控制显示时长下拉，false隐藏、true显示
				selectData: [], //下拉列表的数据
				screenId: '',
				//index: 0, //时长下标
				ip: "",
				free: 0, //默认0收费
				bpImg: "",
				bpZhuti: "",
				// 霸屏发送内容
				theme: "", //主题霸屏名称
				bapingword: "", //霸屏文字
				size: "", //霸屏图片大小
				suffix: "", //图片后缀
				data: "", //图片base64
				duration: 0, //免费默认6秒，霸屏时长
				price: 0, //价格
				itemsIndex: 0, //被点击的主题下标
				notScanCode: true,
				state: "-1",
				showId: '',
				inputBottom: '',
				appType: '', //手机类型
				imgname: '',
				localIP: '',
				sendQueue: [],
				hudongIp: '',
				isVerticalScreen:true,//是否是竖屏状态
			}
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad: function(options) {
			let that = this;
			that.appType = uni.getSystemInfoSync().platform;

			console.log(that.appType, 'appType----手机类型')
		},
		onShow: function() {
			console.log('onShow');
			// console.log(app.globalData.userInfo);
			// this.createConnect()
			// uni.showLoading({
			// 	title: '加载中...',
			// 	mask: true
			// })
		},
		onHide: function() {
			console.log("onhide");
			// clearInterval(timer);
			// uni.closeSocket();
		},
		onUnload: function() {
			console.log("onUnload");
			// clearInterval(timer);
			// uni.closeSocket();
		},
		created() {
			this.createConnect()
			uni.showLoading({
				title: '加载中...',
				// mask: true
			})
		},
		mounted() {

		},
		methods: {
			onResize() {//获取横竖屏状态
				uni.getSystemInfo({
					success: (res) =>{
						// console.log(res.windowWidth);
						// console.log(res.windowHeight);
						if (res.windowWidth > res.windowHeight) {
							// console.log('横屏');
							this.isVerticalScreen = false;
						} else {
							// console.log('竖屏');
							this.isVerticalScreen = true;
						}
					}
				});
			},
			createConnect() {
				page = 1;
				hadLastPage = false;

				var that = this;
				// console.log(app.globalData.userInfo);
				var connectData = utils.getStor('connectData') || '';
				if (connectData == '' || connectData == undefined) {
					this.setData({
						items: []
					});
					if (this.notScanCode) {
						uni.showToast({
							title: '登录可能已过期,请尝试重新扫码登录~',
							icon: "none",
							duration: 2000
						});
					}
					this.setData({
						notScanCode: true
					});
					return;
				}
				this.setData({
					ip: connectData
				});

				this.getScreen();
			},
			setData(obj) { //转换this.xxx = xxxx
				const keys = Object.keys(obj);
				keys.forEach((key) => {
					this[key] = obj[key];
				});
			},
			getScreen: function() {
				// 显示加载图标
				uni.showNavigationBarLoading();

				if (hadLastPage != false) {
					uni.hideNavigationBarLoading();
					uni.showToast({
						title: '没有加载的数据了',
						icon: 'none'
					});
					return;
				}

				// console.log('默认获取全部数据：');
				var data = {};
				data.command = "getsrc";
				data.type = "3"; //1-素材、2-场景、3-霸屏、
				data.classify = String(app.globalData.classifyId); //-1-代表全部、注意：霸屏时填写-1
				data.current = String(page); //请求第几页数据
				data.size = '8'; //每页请求数量
				data.state = '-1'; //-1-全部、0-未下载、1-已下载、
				data.mubuIndex = String(app.globalData.mubuIndex); //幕布索引
				data.dataStatus = '0'; //资源删除状态：-1-删除、0-正常、1-全部
				data.searchCondition = ''; //按照名称或编号模糊查询
				console.log(data, 'getsrc');
				// websocket.send(JSON.stringify(data));
				http.httpRequest(data).then(res => {
					this.returnResult(res)
				}, error => {
					console.log(error);
				})
			},
			//事件处理函数
			send: function() {
				var that = this
				var message = this.bapingword.trim();
				var bpImg = this.bpImg;
				var theme = this.theme;
				var duration = this.duration;
				// console.log(duration);
				// console.log(theme);
				if (duration == 0) {
					uni.showToast({
						title: '请选择霸屏时长',
						icon: "none",
						duration: 2000
					})
				} else {
					if (bpImg == "") {
						that.setData({
							focus: true
						})
						setTimeout(() => {
							that.setData({
								hiddenmodalput: false
							})
						}, 500);

						if (that.free == 1) {
							var data = {};
							data.command = "bapingword"
							data.nickName = String(app.globalData.userInfo.nickName)
							data.theme = String(theme)
							data.bapingword = String(message)
							data.duration = String(duration)
							data.mubuIndex = String(app.globalData.mubuIndex)
							data.ip = String(that.ip)

							// console.log(data, '发送的数据');
							// websocket.send(JSON.stringify(data));
							http.httpRequest(data).then(res => {
								this.returnResult(res)
							}, error => {
								console.log(error);
							})
							// 发送后清空霸屏内容
							that.cleanInput();
						} else {
							if (that.appType == 'ios') {
								uni.showToast({
									title: '暂不支持ios端，请使用Android手机体验',
									icon: 'none'
								})
							} else if (that.appType == 'android') {
								// 小程序支付
								// #ifdef MP-WEIXIN
								that.paymini();
								// #endif

								// app支付
								// #ifdef APP-PLUS
								that.payapp();
								// #endif
							} else {
								// console.log('其他设备')
								// 小程序支付
								// #ifdef MP-WEIXIN
								that.paymini();
								// #endif

								// app支付
								// #ifdef APP-PLUS
								that.payapp();
								// #endif
							}
						}
					} else {
						if (that.free == 1) {
							//霸屏图片
							var data = {};
							data.command = "bapingpic";
							data.nickName = String(app.globalData.userInfo.nickName);
							data.ip = String(that.ip);
							data.type = '1'
							data.imgname = String(that.imgname);
							data.theme = String(theme);
							data.duration = String(duration);
							data.mubuIndex = String(app.globalData.mubuIndex)

							console.log(data, "霸屏图片");
							// websocket.send(JSON.stringify(data));
							http.httpRequest(data).then(res => {
								this.returnResult(res)
							}, error => {
								console.log(error);
							})
							setTimeout(() => {
								that.setData({
									hiddenmodalput: false
								})
							}, 500);
							// 发送后清空霸屏内容
							that.cleanInput();
						} else {
							if (that.appType == 'ios') {
								uni.showToast({
									title: '暂不支持ios端，请使用Android手机体验',
									icon: 'none'
								})
							} else if (that.appType == 'android') {
								// 小程序支付
								// #ifdef MP-WEIXIN
								that.paymini();
								// #endif

								// app支付
								// #ifdef APP-PLUS
								that.payapp();
								// #endif
							} else {
								console.log('其他设备')
								// uni.showToast({
								// 	title: '暂不支持ios端，请使用Android手机体验',
								// 	icon: 'none'
								// })
								// 小程序支付
								// #ifdef MP-WEIXIN
								that.paymini();
								// #endif

								// app支付
								// #ifdef APP-PLUS
								that.payapp();
								// #endif
							}
						}

					}
				}
			},
			paymini: function() { //微信小程序支付
				let dataMsg = {
					"avatarUrl": app.globalData.userInfo.avatarUrl,
					"city": app.globalData.userInfo.city,
					"country": app.globalData.userInfo.country,
					"gender": app.globalData.userInfo.gender,
					"nickName": app.globalData.userInfo.nickName,
					"openId": app.globalData.openId,
					"phoneNumber": app.globalData.phoneNumber,
					"province": app.globalData.userInfo.province,
					"userOrder": {
						"miniappId":utils.getMiniAppInfo(),
						"originalPrice": this.price, //价格
						// "originalPrice": '0.01',//价格
						"maskscreenId": this.showId, //maskscreenId 霸屏id，specialId 特效id
						"tradeType": "MA", //订单来源  MA小程序，APP
						"type": 0, //0霸屏，1特效
						"serialNo": app.globalData.series
					}
				}


				// console.log(dataMsg, '---------------dataMsg---------------')
				// console.log(this.theme, 'theme')

				uni.login({
					provider: 'weixin',
					success: (loginRes) => {
						// console.log(loginRes, '--------loginRes---------')
						let code = loginRes.code;
						// 请求后台数据 prepay_id paySign nonceStr timeStamp
						uni.request({
							url: app.globalData.baseURL + '/wx/order/createOrder',
							data: dataMsg,
							method: "post",
							header: {
								"Content-Type": "application/json",
								"devno": app.globalData.series
							},
							success: (res) => {
								console.log(res, '订单数据');

								uni.showLoading({
									title: '检测支付环境',
									mask: true
								})

								setTimeout(() => {
									uni.hideLoading();
									// 调起支付
									uni.requestPayment({
										provider: 'wxpay',
										timeStamp: res.data.timeStamp,
										nonceStr: res.data.nonceStr,
										package: res.data.packageValue,
										signType: 'MD5',
										paySign: res.data.paySign,
										success: (res) => {
											console.log('success:' + JSON.stringify(res));
											if (res.errMsg == 'requestPayment:ok') {
												if (this.bpImg == "") {
													var data = {};
													data.command = "bapingword"
													data.nickName = String(app.globalData.userInfo.nickName)
													data.theme = String(this.theme)
													data.bapingword = String(this.bapingword.trim())
													data.duration = String(this.duration)
													data.mubuIndex = String(app.globalData.mubuIndex)
													data.ip = String(this.ip)

													console.log(data, '发送的数据');
													// console.log(JSON.stringify(data), '发送的数据');
													//websocket.send(JSON.stringify(data));
													// this.sendQueue.push(data)

													http.httpRequest(data).then(res => {
														this.returnResult(res)
													}, error => {
														console.log(error);
													})
													// 发送后清空霸屏内容
													this.cleanInput();

												} else {
													//霸屏图片
													var data = {};
													data.command = "bapingpic";
													data.nickName = String(app.globalData.userInfo.nickName);
													data.ip = String(this.ip);
													data.type = '1'
													data.imgname = String(this.imgname);
													data.theme = String(this.theme);
													data.duration = String(this.duration);
													data.mubuIndex = String(app.globalData.mubuIndex)

													console.log(data, "霸屏图片");
													//websocket.send(JSON.stringify(data));
													// this.sendQueue.push(data)

													http.httpRequest(data).then(res => {
														this.returnResult(res)
													}, error => {
														console.log(error);
													})
													// setTimeout(() => {
													this.setData({
														hiddenmodalput: false
													})
													// 发送后清空霸屏内容
													this.cleanInput();
													// }, 500);

												}

											}
										},
										fail: function(err) {
											console.log('fail:' + JSON.stringify(err));
											uni.showToast({
												title: '支付失败',
												duration: 2000
											})
										}
									});
								}, 2000)

							}
						});
					}
				});
			},
			payapp: function() { //App支付

				let dataMsg = {
					"avatarUrl": app.globalData.userInfo.avatarUrl,
					"city": app.globalData.userInfo.city,
					"country": app.globalData.userInfo.country,
					"gender": app.globalData.userInfo.gender,
					"nickName": app.globalData.userInfo.nickName,
					"openId": app.globalData.openId,
					"phoneNumber": app.globalData.phoneNumber,
					"province": app.globalData.userInfo.province,
					"userOrder": {
						"originalPrice": this.price, //价格
						// "originalPrice": '0.01',//价格
						"maskscreenId": this.showId, //maskscreenId 霸屏id，specialId 特效id
						"tradeType": "APP", //订单来源  MA小程序，APP
						"type": 0, //0霸屏，1特效
						"serialNo": app.globalData.series
					}
				}


				// console.log(dataMsg, '---------------dataMsg---------------')

				uni.login({
					provider: 'weixin',
					success: (loginRes) => {
						// console.log(loginRes, '--------loginRes---------')
						// let code = loginRes.code;
						// 请求后台数据 prepay_id paySign nonceStr timeStamp
						uni.request({
							url: app.globalData.baseURL + '/wx/order/createOrder',
							data: dataMsg,
							method: "post",
							header: {
								"Content-Type": "application/json",
								"devno": app.globalData.series
							},
							success: (res) => {
								// console.log(res, '订单数据');
								// console.log(res.data, '订单数据');

								uni.showLoading({
									title: '检测支付环境',
									mask: true
								})

								let orderInfo = {
									"appid": res.data.appId,
									"noncestr": res.data.nonceStr,
									"package": res.data.packageValue, // 固定值，以微信支付文档为主
									"partnerid": res.data.partnerId,
									"prepayid": res.data.prepayId,
									"timestamp": res.data.timeStamp,
									"sign": res.data.sign // 根据签名算法生成签名
								}

								// console.log(JSON.stringify(orderInfo))

								setTimeout(() => {
									uni.hideLoading();
									// 调起支付
									uni.requestPayment({
										provider: 'wxpay',
										orderInfo: orderInfo, //微信、支付宝订单数据  
										success: (res) => {

											console.log('success:' + JSON.stringify(res));
											if (res.errMsg == 'requestPayment:ok') {
												if (this.bpImg == "") {
													var data = {};
													data.command = "bapingword"
													data.nickName = String(app.globalData.userInfo.nickName)
													data.theme = String(this.theme)
													data.bapingword = String(this.bapingword.trim())
													data.duration = String(this.duration)
													data.mubuIndex = String(app.globalData.mubuIndex)
													data.ip = String(this.ip)
													console.log(data, '发送的数据');
													//websocket.send(JSON.stringify(data));
													// this.sendQueue.push(data)

													http.httpRequest(data).then(res => {
														this.returnResult(res)
													}, error => {
														console.log(error);
													})
													// 发送后清空霸屏内容
													this.cleanInput();
												} else {
													//霸屏图片
													var data = {};
													data.command = "bapingpic";
													data.nickName = String(app.globalData.userInfo.nickName);
													data.ip = String(this.ip);
													data.type = '1'
													data.imgname = String(this.imgname);
													data.theme = String(this.theme);
													data.duration = String(this.duration);
													data.mubuIndex = String(app.globalData.mubuIndex)

													console.log(data, "霸屏图片");
													//websocket.send(JSON.stringify(data));
													// this.sendQueue.push(data)

													http.httpRequest(data).then(res => {
														this.returnResult(res)
													}, error => {
														console.log(error);
													})

													// setTimeout(() => {
													this.setData({
														hiddenmodalput: false
													})

													// 发送后清空霸屏内容
													this.cleanInput();
													// }, 500);

												}
											}

										},
										fail: function(err) {
											console.log('fail:' + JSON.stringify(err));
											uni.showToast({
												title: '支付失败',
												duration: 2000
											})
										}
									});
								}, 2000)
							}
						});
					}
				});
			},
			/**
			 * 获取聚焦
			 */
			focusFn: function(e) {
				var keyHeight = e.detail.height;
				console.log("获取焦点" + e.detail.height);
				this.setData({
					inputBottom: keyHeight + 'px'
				})
				console.log(this.inputBottom);
			},
			//失去聚焦(软键盘消失)
			blurFn: function(e) {
				console.log("失去聚焦");
				this.setData({
					inputBottom: '120rpx'
				})
				console.log(this.inputBottom);
			},
			//监听input值的改变
			bindChange: function(e) {
				if (e.detail.value == '') {
					this.setData({
						increase: true
					});
				} else {
					this.setData({
						increase: false
					});
				}
				this.setData({
					bapingword: e.detail.value
				});
			},
			cleanInput() {
				//button会自动清空，所以不能再次清空而是应该给他设置目前的input值
				this.setData({
					bpImg: '',
					theme: '',
					bapingword: '',
					size: '',
					suffix: '',
					data: '',
					duration: '',
					isdisabled: false,
					increase: true,
					price: 0
				})
			},
			increaseFn(e) {
				var baping = e.currentTarget.dataset.baping;
				var itemsIndex = e.currentTarget.dataset.index;
				console.log("获取霸屏数据");
				console.log(baping);
				this.setData({
					hiddenmodalput: false,
					bapingid: baping.kid,
					itemsIndex: itemsIndex,
					theme: baping.name,
					// bpZhuti: 'https://huoshan.szhssj.com.cn/baping/' + baping.channel + '/' + baping.id + '/frame_compact.png',
					// bpZhuti: baping.imageContent != null ? baping.imageContent.replace(/[\r\n]/g, "") : baping.imageContent,
					bpZhuti: baping.imageContent,
					free: baping.free,
					showId: baping.id,
					price: baping.price
				})
				if (baping.state == 0) { //0-未下载、1-已下载
					//未下载
					var data = {};
					data.command = "changresstate";
					data.id = String(baping.kid);
					data.type = "3";
					data.mubuIndex = String(app.globalData.mubuIndex)
					console.log(JSON.stringify(data));
					// websocket.send(JSON.stringify(data));

					http.httpRequest(data).then(res => {
						uni.showToast({
							title: '下载中,请稍后...',
							icon: "none",
							duration: 2000
						})
						setTimeout(() => {
							this.returnResult(res)
						}, 1000)
					}, error => {
						console.log(error);
					})
				} else if (baping.state == 1) {

					if (this.appType == 'ios' && baping.free == 0) {
						//已下载,可以设置霸屏内容了
						this.setData({
							hiddenmodalput: false
						});
						uni.showToast({
							title: '暂不支持ios端，请使用Android手机体验',
							icon: 'none'
						})
					} else if (this.appType == 'android') {
						//已下载,可以设置霸屏内容了
						this.setData({
							hiddenmodalput: true
						});
					} else {
						//已下载,可以设置霸屏内容了
						this.setData({
							hiddenmodalput: true
						});
					}

					if (baping.free == 0) { //0-收费、1-免费
						this.setData({
							selectTime: true
						});
					} else {
						this.setData({
							// selectData: [],
							duration: 6, //免费默认6秒
							price: 0,
							selectTime: false
						});
					}
				} else {
					//下载中
					this.closeBpSet();
					uni.showToast({
						title: '下载中,请稍后...',
						icon: "none",
						duration: 2000
					})
				}
			},
			chooseImage() {
				var that = this
				uni.chooseImage({
					sourceType: ['album', 'camera'],
					maxDuration: 60,
					camera: 'back',
					success: (res) => {

						console.log(res.tempFilePaths[0])
						//#ifdef MP-WEIXIN
						uni.getFileSystemManager().readFile({
							filePath: res.tempFilePaths[0],
							encoding: 'base64',
							success: res1 => {
								//返回临时文件路径
								var index = res.tempFiles[0].path.lastIndexOf(".");
								var suffix = res.tempFiles[0].path.substr(index + 1);
								// var base64ImgUrl = "data:image/png;base64," + res1.data.toString();
								// console.log(base64ImgUrl);
								that.setData({
									bpImg: res.tempFilePaths[0],
									theme: that.theme,
									bapingword: that.bapingword,
									size: res.tempFiles[0].size,
									suffix: suffix,
									data: res1.data,
									duration: that.duration,
									isdisabled: true
								});

								// setTimeout(() => {
								that.sendHeaderImg(suffix, res1.data);
								// }, 1000)
							},
							fail: console.error
						})
						//#endif

						//#ifdef APP-PLUS
						console.log('---------app_img----------------')
						//通过URL参数获取目录对象或文件对象
						plus.io.resolveLocalFileSystemURL(res.tempFilePaths[0], function(entry) {
							// 可通过entry对象操作test.html文件
							entry.file(function(file) { //获取文件数据对象
								var fileReader = new plus.io.FileReader(); // 文件系统中的读取文件对象，用于获取文件的内容
								//alert("getFile:" + JSON.stringify(file));
								fileReader.readAsDataURL(file); //以URL编码格式读取文件数据内容
								fileReader.onloadend = function(evt) { //读取文件成功完成的回调函数

									let base64Arr = evt.target.result.split(',')
									// console.log(base64Arr[0],'arr1')
									console.log(base64Arr[1], 'arr1')

									let base64_Path = base64Arr[1];

									//返回临时文件路径
									var index = res.tempFiles[0].path.lastIndexOf(".");
									var suffix = res.tempFiles[0].path.substr(index + 1);

									that.setData({
										bpImg: res.tempFilePaths[0],
										theme: that.theme,
										bapingword: that.bapingword,
										size: res.tempFiles[0].size,
										suffix: suffix,
										data: base64_Path,
										duration: that.duration,
										isdisabled: true
									});

									// setTimeout(() => {
									that.sendHeaderImg(suffix, base64_Path);
									// }, 1000)
								}
							})
						})
						//#endif

						return;
					}
				})
			},
			sendHeaderImg(suffix, base64_Path) { //发送base64图片
				console.log('发送中....');
				// console.log(suffix)
				// console.log(base64_Path)
				let data = {};
				data.command = "bapingpic";
				data.type = '0';
				data.ip = String(this.ip);
				data.suffix = String(suffix);
				data.pic = String(base64_Path);
				console.log(data, '-----------上传图片------------')

				// websocket.send(JSON.stringify(data));
				http.httpRequest(data).then(res => {
					console.log(res, 'res')
					// this.returnResult(res)
					let jsonObj = res.data;
					if (jsonObj.imgname != undefined) {
						this.imgname = jsonObj.imgname
						console.log(this.imgname, 'imgname')
					}
				}, error => {
					console.log(error);
				})
			},
			// 点击下拉显示框
			selectTap() {
				if (this.free == 0) {
					this.setData({
						selectShow: !this.selectShow
					});
				} else {
					this.setData({
						selectShow: false
					});
				}
			},
			// 点击下拉列表
			selectClick: function(res) {
				//获取点击事件的信息
				let clickInfo = res
				console.log(clickInfo);
				this.setData({
					screenId: clickInfo.id,
					duration: clickInfo.text,
					price: clickInfo.price
				});
			},
			// 关闭霸屏设置
			closeBpSet() {
				this.cleanInput();
				this.setData({
					hiddenmodalput: false
				});
			},
			returnResult(res) { //返回的结果

				let that = this;
				if (res == undefined) {
					uni.showToast({
						title: '登录可能已过期,请尝试重新扫码登录~',
						icon: "none",
						duration: 2000
					});
					return false;
				}
				
				// var jsonObj = JSON.parse(res.data);
				if (res.data != undefined) {
					var jsonObj = res.data;
					console.log(jsonObj, '这里是后台返回的数据')

					//下载中
					if (jsonObj.command == "changresstate" && jsonObj.type == 3) {
						var id = jsonObj.id;
						var data = that.items;
						// console.log(id);
						console.log(data);
						for (let i = 0; i < data.length; i++) {
							if (data[i].kid == id) {
								var state = 'items[' + i + '].state';
								if (jsonObj.state == 1) {
									setTimeout(() => {
										data[i].state = jsonObj.state
									}, 1500);
								} else {
									data[i].state = jsonObj.state
								}
								break;
							}
						}
					}

					if (jsonObj.command == "sendctrl") {
						if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						}
					}
					if (jsonObj.command == "login") {
						uni.hideLoading()
						if (jsonObj.result == "SUCCESS") {
							// that.getScreen();
						} else {
							utils.showErrorMsgFun(jsonObj);
						}
					}
					if (jsonObj.command == "getsrc") {
						uni.hideLoading();
						if (jsonObj.result == "SUCCESS") {
							if (jsonObj.timeprice != undefined) {
								that.selectData = [];
								let timeprice = jsonObj.timeprice;
								console.log(timeprice, "获取时长+价格下拉选项")

								for (let i = 0; i < timeprice.length; i++) {
									let item = {
										id: timeprice[i].id,
										text: timeprice[i].label,
										price: timeprice[i].value
									}

									that.selectData.push(item)
								}

								console.log(that.selectData, 'that.selectData')
							}

							if (jsonObj.datas != undefined) {
								//霸屏信息
								var data = jsonObj.datas;
								// var data = app.globalData.bapData;
								var item = page > 1 ? that.items : [];
								console.log("获取霸屏信息");
								// console.log(data);
								// console.log(item);
								data.forEach((items, index, arr) => {
									if (items.imageContent != undefined) {
										var base64 = items.imageContent;
										if (base64 != null) {
											items.imageContent = base64.replace(/[\r\n]/g, "");
										}
									}
									item.push(items);
								});
								// console.log(item);
								that.setData({
									items: item
								});
								if (data.length > 0) {
									page++;
								} else {
									hadLastPage = true;
								}
								uni.hideNavigationBarLoading();
							}
						} else if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						}
					}

					if (jsonObj.command == "bapingword" || jsonObj.command == "bapingpic") {
						if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						}
					}

					if (jsonObj.command == "bapingpic" && jsonObj.result == "SUCCESS") {
						if (jsonObj.imgname != undefined) {
							that.imgname = jsonObj.imgname
						}
					}

					//互动服务器
					if (jsonObj.command == "hudong" && jsonObj.result == 'SUCCESS') {
						uni.showToast({
							title: '操作成功～',
							icon: 'none'
						})
					}
				}

			},
			menuItemSendHttp(data) { //搜索菜单发送请求
				http.httpRequest(data).then(res => {
					// console.log(res,'http获取到的数据');
					this.returnResult(res)
				}, error => {
					console.log(error);
				})
			},
			menuItemClick: function(res) {
				// console.log(res, '--------res-------')
				//获取点击事件的信息
				let clickInfo = res;
				// console.log(clickInfo);
				// 根据不同类型进行判别处理
				//事件的处理 代码
				switch (clickInfo.id) {
					case "1":
						// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":0,"ctl":0}');
						let volUp = {
							command: "vol",
							mubuIndex: String(app.globalData.mubuIndex),
							type: '0',
							ctl: '0'
						}
						this.menuItemSendHttp(volUp);
						break;
					case "2":
						// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":0,"ctl":1}');
						let volDown = {
							command: "vol",
							mubuIndex: String(app.globalData.mubuIndex),
							type: '0',
							ctl: '1'
						}
						this.menuItemSendHttp(volDown);
						break;
					case "3":
						if (clickInfo.isPlayVideo) { //播放
							// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":1,"ctl":1}');
							let play = {
								command: "vol",
								mubuIndex: String(app.globalData.mubuIndex),
								type: '1',
								ctl: '1'
							}
							this.menuItemSendHttp(play);
						} else { //暂停
							// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":1,"ctl":0}');
							let pause = {
								command: "vol",
								mubuIndex: String(app.globalData.mubuIndex),
								type: '1',
								ctl: '0'
							}
							this.menuItemSendHttp(pause);
						}
						break;
					case "5":
						// websocket.send('{ "command": "sendctrl","v":"43","d":{"k1":' + app.globalData.mubuIndex + ',"k2":1}}');
						let pause = {
							command: "sendctrl",
							v: '43',
							d: JSON.stringify({
								k1: String(app.globalData.mubuIndex),
								k2: '1'
							})
						}
						this.menuItemSendHttp(pause);
						break;
					case "6":
						this.setData({
							notScanCode: false
						});

						//#ifdef MP-WEIXIN
						app.globalData.loginType = 0;
						//#endif 

						//#ifdef APP-PLUS
						app.globalData.loginType = 1;
						//#endif 

						uni.scanCode({
							success: (res) => {
								let arr = [];
								if(res.result.indexOf("http://mp2")==0){
									arr = res.result.split("=")[1].split(",");
								}else{
									arr = res.result.split(",");
								}
								console.log(arr);
								if (arr.length > 1) {
									app.globalData.mubuIndex = arr[1];
									utils.setStor('connectData', arr[0]);
									uni.setStorageSync('mubuIndex', arr[1]);

								} else {
									app.globalData.mubuIndex = 0;
									utils.setStor('connectData', arr);
									uni.setStorageSync('mubuIndex', 0);
								}
								this.setData({
									ip: utils.getStor('connectData'),
									items: []
								});
								// uni.closeSocket()
								this.createConnect();
							},
							fail: (res) => {
								uni.showToast({
									title: '扫码失败~',
									icon: 'none',
									duration: 2000
								})
							},
							complete: (res) => {}
						});
						break;
					case "7":
						if (app.globalData.mainMubuNo == 1) {
							uni.showToast({
								title: '暂无操作权限~',
								icon: 'none'
							})
						} else {
							// websocket.send('{ "command": "sendctrl","v":"43","d":{"k1":' + app.globalData.mubuIndex + ',"k2":0}}');
							let bg = {
								command: "sendctrl",
								v: '43',
								d: JSON.stringify({
									k1: String(app.globalData.mubuIndex),
									k2: '0'
								})
							}
							this.menuItemSendHttp(bg);
						}
						break;
					case "8": //控制按钮
						// this.$refs.control.pwdDialog = 'checkPwd'
						// this.$refs.control.isShowSelectOpt = true
						let serverIP = '';
						//#ifdef MP-WEIXIN
						uni.showToast({
							title: '暂时无法使用~',
							icon: 'none'  
						})
						// this.$refs.pwd.pwdDialog = 'Modal'
						// serverIP = uni.getStorageSync('zkLocalIP') || '';

						// if(serverIP == '' || serverIP == undefined){
						// 	this.localIP = serverIP
						// }else{
						// 	this.localIP = serverIP
						// }
						//#endif 

						//#ifdef APP-PLUS
						this.$refs.pwd.pwdDialog = 'Modal'
						serverIP = uni.getStorageSync('zkLocalIP') || '';
						if (serverIP == '' || serverIP == undefined) {
							this.localIP = serverIP
						} else {
							this.localIP = serverIP
						}
						//#endif 
						break;
					case "9": //互动
						this.$refs.hudong.modalName = 'modal'
						this.hudongIp = uni.getStorageSync('hudongIp') || '';
						break;
					case "10": //关于
						this.$refs.about.modalName = 'modal'
						break;
				}
			},
		},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh: function() {
			console.log("执行下拉");
			page = 1;
			hadLastPage = false;
			this.setData({
				items: []
			});

			this.getScreen();

			// 隐藏导航栏加载框
			uni.hideNavigationBarLoading();
			uni.stopPullDownRefresh();

			uni.showLoading({
				title: '加载中...',
				// mask: true
			})
		},

		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom: function() {
			console.log("执行上拉");
			this.getScreen();
		},
	}
</script>

<style>
	/* page {
		background-color: #313247;
	} */
</style>

<style scoped>
	/* page {
		background-color: #313247;
		height: 100%;
	} */

	.massage {
		position: relative;
	}

	.schoollist {
		margin-top: 0rpx;
		height: 10rpx;
	}

	.school-list {
		padding-bottom: 150rpx;
	}

	.school-list-item {
		background-color: #3A3A52;
		width: 100%;
		margin-top: 10rpx;
		margin-bottom: 20rpx;
		display: flex;
		flex-wrap: nowrap;
	}

	.school-list-info {
		position: relative;
		width: 40%;
		margin: 40rpx 40rpx 20rpx 40rpx;
		border-radius: 8rpx;
		text-align: center;
	}

	.school-list-photo,
	.school-list-photo-Selected,
	.school-list-photo2 {
		width: 100%;
		height: 180rpx;
		border: 4rpx solid #666;
		border-radius: 8rpx;
		vertical-align: middle;
		box-sizing: border-box;
	}

	.school-list-photo-Selected {
		border: 4rpx solid #ffe570;
	}

	.school-list-photo2 {
		border: none;
	}

	.message .school-list-photo2 {
		width: 380rpx;
		height: 220rpx;
		margin: 20rpx 0;
	}

	.school-list-photo-free-up {
		position: absolute;
		z-index: 2;
		top: 0;
		right: 0;
		width: 50rpx;
		height: 84rpx;
	}

	.school-list-photo-up {
		position: absolute;
		z-index: 3;
		top: 0;
		left: 0;
		background: rgba(0, 0, 0, .6);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.school-list-notLoad {
		color: #fff;
		font-size: 30rpx;
	}

	.school-list-desc {
		display: block;
		color: #fff;
		text-align: center;
		font-size: 25rpx;
		padding: 10rpx;
	}

	/* 霸屏设置 */

	.bapingContent {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		bottom: 120rpx;
		min-height: 700rpx;
		min-width: 620rpx;
		/* height: 500rpx;
		width: 620rpx; */
		background-color: #535178;
		z-index: 100;
		text-align: center;
		padding: 30rpx 20rpx 0 20rpx;
		border-radius: 8rpx;
	}

	.extra-btn-style1 {
		width: 65rpx;
		height: 65rpx;
		padding: 10rpx 25rpx;
		display: flex;
		flex-shrink: 0;
	}

	.extra-btn-style2 {
		width: 65rpx;
		height: 65rpx;
		padding: 10rpx;
		display: flex;
		flex-shrink: 0;
	}

	.input-text-voice-super {
		position: absolute;
		bottom: 0;
		left: 0;
		display: flex;
		flex-direction: row;
		width: 100%;
		height: 110rpx;
		align-items: center;
	}

	.chat-input-style {
		border-radius: 20rpx;
		border: 1rpx solid #ffffff;
		padding: 10rpx 20rpx;
		min-height: 45rpx;
		font-size: 28rpx;
		color: #ffffff;
	}

	.chat-input-send-button-style {
		width: 170rpx;
		height: 70rpx;
		line-height: 70rpx;
		padding: 0 10rpx;
		font-size: 30rpx;
		text-align: center;
		margin-right: 25rpx;
		border-radius: 15rpx;
		border: 1rpx solid #ffffff;
		color: #ffffff;
		background-color: transparent;
	}

	.btnhover {
		border: 1rpx solid #ffffff;
		color: #fff;
		background-color: #3A3A52;
	}

	button::after {
		border: none !important;
	}

	/* 下拉 */

	.select_box {
		/* width:45%;
	  height:70%; */
		position: relative;
		font-size: 28rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-wrap: wrap;
		color: #ffffff;
	}

	.select_box .select {
		background-color: #ffe570;
		box-sizing: border-box;
		height: 52rpx;
		width: 240rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-left: 10rpx;
		margin-right: 20rpx;
		position: relative;
	}

	.select_box .select .select_text {
		font-size: 26rpx;
		line-height: 28rpx;
		text-align: center;
	}

	.select_box .select .select_img {
		width: 30rpx;
		height: 30rpx;
		display: block;
		transition: transform 0.3s;
		position: absolute;
		right: 20rpx;
	}

	.select_box .select .select_img_rotate {
		transform: rotate(180deg);
	}

	.select_box .option_box {
		position: absolute;
		top: 51rpx;
		width: 243rpx;
		box-sizing: border-box;
		height: 0;
		overflow-y: auto;
		background: #ffe570;
		transition: height 0.3s;
		text-align: center;
		border-left: 1rpx solid #fff;
		border-right: 1rpx solid #fff;
		border-top: 1rpx solid #fff;
	}

	.select_box .option_box .option {
		display: block;
		height: 50rpx;
		line-height: 50rpx;
		font-size: 26rpx;
		box-sizing: border-box;
		border-bottom: 1rpx solid #fff;
	}

	/* 关闭霸屏设置按钮 */
	.closeBpsetting {
		display: block;
		width: 100%;
		text-align: right;
	}

	.closeBpsetting image {
		width: 48rpx;
		height: 48rpx;
	}
	
	.img-size .school-list-photo,.img-size .school-list-photo-Selected {
		height: 220rpx !important;
	}
	
	@media screen and (min-width: 769px) {
		.nav {
			height: 60rpx !important;
		}
		
		.nav view {
			font-size: 22px !important;
			line-height: 60rpx !important;
		}
		
		.nav .default {
			line-height: 60rpx !important;
		}
		
		.school-list-item {
			margin-bottom: 0 !important;
		}
		
		.img-size .school-list-photo,.img-size .school-list-photo-Selected {
			height: 220rpx !important;
		}
		
		.schoollist {
			padding-top: 10rpx !important;
		}
		
		.school-list-info {
			width: 45% !important;
			margin: 30rpx 30rpx 10rpx 30rpx !important;
		}
		
		.bapingContent {
			top: 20rpx;
		}
	}
	
	@media screen and (min-device-width: 641px) and (max-device-width: 768px) {
		.nav {
			height: 60rpx !important;
		}
	
		.nav view {
			font-size: 22px !important;
			line-height: 60rpx !important;
		}
	
		.nav .default {
			line-height: 60rpx !important;
		}
	
		.school-list-item {
			margin-bottom: 0 !important;
		}
	
		.img-size .school-list-photo,.img-size .school-list-photo-Selected {
			height: 220rpx !important;
		}
	
		.schoollist {
			padding-top: 10rpx !important;
		}
	
		.school-list-info {
			width: 45% !important;
			margin: 30rpx 30rpx 10rpx 30rpx !important;
		}
		.bapingContent {
			top: 20rpx;
		}
	}
	
	@media screen and (min-device-width: 401px) and (max-device-width: 640px) {
		.massage {
			position: relative;
		}
		
		.schoollist {
			margin-top: 0rpx;
			height: 10rpx;
		}
		
		.school-list {
			padding-bottom: 150rpx;
		}
		
		.school-list-item {
			background-color: #3A3A52;
			width: 100%;
			margin-top: 10rpx;
			margin-bottom: 20rpx;
			display: flex;
			flex-wrap: nowrap;
		}
		
		.school-list-info {
			position: relative;
			width: 40%;
			margin: 40rpx 40rpx 20rpx 40rpx;
			border-radius: 8rpx;
			text-align: center;
		}
		
		.school-list-photo,
		.school-list-photo-Selected,
		.school-list-photo2 {
			width: 100%;
			height: 180rpx;
			border: 4rpx solid #666;
			border-radius: 8rpx;
			vertical-align: middle;
			box-sizing: border-box;
		}
		
		.school-list-photo-Selected {
			border: 4rpx solid #ffe570;
		}
		
		.school-list-photo2 {
			border: none;
		}
		
		.message .school-list-photo2 {
			width: 380rpx;
			height: 220rpx;
			margin: 20rpx 0;
		}
		
		.school-list-photo-free-up {
			position: absolute;
			z-index: 2;
			top: 0;
			right: 0;
			width: 50rpx;
			height: 84rpx;
		}
		
		.school-list-photo-up {
			position: absolute;
			z-index: 3;
			top: 0;
			left: 0;
			background: rgba(0, 0, 0, .6);
			display: flex;
			align-items: center;
			justify-content: center;
		}
		
		.school-list-notLoad {
			color: #fff;
			font-size: 30rpx;
		}
		
		.school-list-desc {
			display: block;
			color: #fff;
			text-align: center;
			font-size: 25rpx;
			padding: 10rpx;
		}
		
		/* 霸屏设置 */
		
		.bapingContent {
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			bottom: 120rpx;
			min-height: 700rpx;
			min-width: 620rpx;
			/* height: 500rpx;
			width: 620rpx; */
			background-color: #535178;
			z-index: 100;
			text-align: center;
			padding: 30rpx 20rpx 0 20rpx;
			border-radius: 8rpx;
		}
		
		.extra-btn-style1 {
			width: 65rpx;
			height: 65rpx;
			padding: 10rpx 25rpx;
			display: flex;
			flex-shrink: 0;
		}
		
		.extra-btn-style2 {
			width: 65rpx;
			height: 65rpx;
			padding: 10rpx;
			display: flex;
			flex-shrink: 0;
		}
		
		.input-text-voice-super {
			position: absolute;
			bottom: 0;
			left: 0;
			display: flex;
			flex-direction: row;
			width: 100%;
			height: 110rpx;
			align-items: center;
		}
		
		.chat-input-style {
			border-radius: 20rpx;
			border: 1rpx solid #ffffff;
			padding: 10rpx 20rpx;
			min-height: 45rpx;
			font-size: 28rpx;
			color: #ffffff;
		}
		
		.chat-input-send-button-style {
			width: 170rpx;
			height: 70rpx;
			line-height: 70rpx;
			padding: 0 10rpx;
			font-size: 30rpx;
			text-align: center;
			margin-right: 25rpx;
			border-radius: 15rpx;
			border: 1rpx solid #ffffff;
			color: #ffffff;
			background-color: transparent;
		}
		
		.btnhover {
			border: 1rpx solid #ffffff;
			color: #fff;
			background-color: #3A3A52;
		}
		
		button::after {
			border: none !important;
		}
		
		/* 下拉 */
		
		.select_box {
			/* width:45%;
		  height:70%; */
			position: relative;
			font-size: 28rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-wrap: wrap;
			color: #ffffff;
		}
		
		.select_box .select {
			background-color: #ffe570;
			box-sizing: border-box;
			height: 52rpx;
			width: 240rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-left: 10rpx;
			margin-right: 20rpx;
			position: relative;
		}
		
		.select_box .select .select_text {
			font-size: 26rpx;
			line-height: 28rpx;
			text-align: center;
		}
		
		.select_box .select .select_img {
			width: 30rpx;
			height: 30rpx;
			display: block;
			transition: transform 0.3s;
			position: absolute;
			right: 20rpx;
		}
		
		.select_box .select .select_img_rotate {
			transform: rotate(180deg);
		}
		
		.select_box .option_box {
			position: absolute;
			top: 51rpx;
			width: 243rpx;
			box-sizing: border-box;
			height: 0;
			overflow-y: auto;
			background: #ffe570;
			transition: height 0.3s;
			text-align: center;
			border-left: 1rpx solid #fff;
			border-right: 1rpx solid #fff;
			border-top: 1rpx solid #fff;
		}
		
		.select_box .option_box .option {
			display: block;
			height: 50rpx;
			line-height: 50rpx;
			font-size: 26rpx;
			box-sizing: border-box;
			border-bottom: 1rpx solid #fff;
		}
		
		/* 关闭霸屏设置按钮 */
		.closeBpsetting {
			display: block;
			width: 100%;
			text-align: right;
		}
		
		.closeBpsetting image {
			width: 48rpx;
			height: 48rpx;
		}
	}
	
	@media only screen and (max-device-width: 400px) {
		.massage {
			position: relative;
		}
		
		.schoollist {
			margin-top: 0rpx;
			height: 10rpx;
		}
		
		.school-list {
			padding-bottom: 150rpx;
		}
		
		.school-list-item {
			background-color: #3A3A52;
			width: 100%;
			margin-top: 10rpx;
			margin-bottom: 20rpx;
			display: flex;
			flex-wrap: nowrap;
		}
		
		.school-list-info {
			position: relative;
			width: 40%;
			margin: 40rpx 40rpx 20rpx 40rpx;
			border-radius: 8rpx;
			text-align: center;
		}
		
		.school-list-photo,
		.school-list-photo-Selected,
		.school-list-photo2 {
			width: 100%;
			height: 180rpx;
			border: 4rpx solid #666;
			border-radius: 8rpx;
			vertical-align: middle;
			box-sizing: border-box;
		}
		
		.school-list-photo-Selected {
			border: 4rpx solid #ffe570;
		}
		
		.school-list-photo2 {
			border: none;
		}
		
		.message .school-list-photo2 {
			width: 380rpx;
			height: 220rpx;
			margin: 20rpx 0;
		}
		
		.school-list-photo-free-up {
			position: absolute;
			z-index: 2;
			top: 0;
			right: 0;
			width: 50rpx;
			height: 84rpx;
		}
		
		.school-list-photo-up {
			position: absolute;
			z-index: 3;
			top: 0;
			left: 0;
			background: rgba(0, 0, 0, .6);
			display: flex;
			align-items: center;
			justify-content: center;
		}
		
		.school-list-notLoad {
			color: #fff;
			font-size: 30rpx;
		}
		
		.school-list-desc {
			display: block;
			color: #fff;
			text-align: center;
			font-size: 25rpx;
			padding: 10rpx;
		}
		
		/* 霸屏设置 */
		
		.bapingContent {
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			bottom: 120rpx;
			min-height: 700rpx;
			min-width: 620rpx;
			/* height: 500rpx;
			width: 620rpx; */
			background-color: #535178;
			z-index: 100;
			text-align: center;
			padding: 30rpx 20rpx 0 20rpx;
			border-radius: 8rpx;
		}
		
		.extra-btn-style1 {
			width: 65rpx;
			height: 65rpx;
			padding: 10rpx 25rpx;
			display: flex;
			flex-shrink: 0;
		}
		
		.extra-btn-style2 {
			width: 65rpx;
			height: 65rpx;
			padding: 10rpx;
			display: flex;
			flex-shrink: 0;
		}
		
		.input-text-voice-super {
			position: absolute;
			bottom: 0;
			left: 0;
			display: flex;
			flex-direction: row;
			width: 100%;
			height: 110rpx;
			align-items: center;
		}
		
		.chat-input-style {
			border-radius: 20rpx;
			border: 1rpx solid #ffffff;
			padding: 10rpx 20rpx;
			min-height: 45rpx;
			font-size: 28rpx;
			color: #ffffff;
		}
		
		.chat-input-send-button-style {
			width: 170rpx;
			height: 70rpx;
			line-height: 70rpx;
			padding: 0 10rpx;
			font-size: 30rpx;
			text-align: center;
			margin-right: 25rpx;
			border-radius: 15rpx;
			border: 1rpx solid #ffffff;
			color: #ffffff;
			background-color: transparent;
		}
		
		.btnhover {
			border: 1rpx solid #ffffff;
			color: #fff;
			background-color: #3A3A52;
		}
		
		button::after {
			border: none !important;
		}
		
		/* 下拉 */
		
		.select_box {
			/* width:45%;
		  height:70%; */
			position: relative;
			font-size: 28rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-wrap: wrap;
			color: #ffffff;
		}
		
		.select_box .select {
			background-color: #ffe570;
			box-sizing: border-box;
			height: 52rpx;
			width: 240rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-left: 10rpx;
			margin-right: 20rpx;
			position: relative;
		}
		
		.select_box .select .select_text {
			font-size: 26rpx;
			line-height: 28rpx;
			text-align: center;
		}
		
		.select_box .select .select_img {
			width: 30rpx;
			height: 30rpx;
			display: block;
			transition: transform 0.3s;
			position: absolute;
			right: 20rpx;
		}
		
		.select_box .select .select_img_rotate {
			transform: rotate(180deg);
		}
		
		.select_box .option_box {
			position: absolute;
			top: 51rpx;
			width: 243rpx;
			box-sizing: border-box;
			height: 0;
			overflow-y: auto;
			background: #ffe570;
			transition: height 0.3s;
			text-align: center;
			border-left: 1rpx solid #fff;
			border-right: 1rpx solid #fff;
			border-top: 1rpx solid #fff;
		}
		
		.select_box .option_box .option {
			display: block;
			height: 50rpx;
			line-height: 50rpx;
			font-size: 26rpx;
			box-sizing: border-box;
			border-bottom: 1rpx solid #fff;
		}
		
		/* 关闭霸屏设置按钮 */
		.closeBpsetting {
			display: block;
			width: 100%;
			text-align: right;
		}
		
		.closeBpsetting image {
			width: 48rpx;
			height: 48rpx;
		}
	}
</style>
